package actions;

import java.util.List;
import org.apache.log4j.Logger;
import beans.User;

import com.opensymphony.xwork2.ActionSupport;

import controllers.AbstractController;


public class AssignUserToGroup extends ActionSupport {

	private static final long serialVersionUID = 1164809814839976523L;

	private static final Logger LOGGER = Logger.getLogger(AssignUserToGroup.class);

	
	// -------------------------------------------------------------
	// Objects
	// -------------------------------------------------------------

	AbstractController controller = new AbstractController();

	private String user;
	private String group;
	
	private boolean result;
	
	
	// -------------------------------------------------------------
	// Methods
	// -------------------------------------------------------------

	public String execute() {
		setResult(controller.addUserToGroup(Integer.parseInt(getUser()), Integer.parseInt(getGroup())));
		return SUCCESS;
	}


	public String getUser() {
		return user;
	}


	public void setUser(String user) {
		this.user = user;
	}


	public String getGroup() {
		return group;
	}


	public void setGroup(String group) {
		this.group = group;
	}


	public boolean getResult() {
		return result;
	}


	public void setResult(boolean result) {
		this.result = result;
	}





}
